function [AM_Event_Rate, AM_Event_Rate_Mean] = AM_Event_Rate_One_Animal_One_Dose(Data_Summary, AnimalID, Drug)

for n=1:size(Data_Summary,2)
    if strcmp(Data_Summary(n).animalName, AnimalID) && strcmp(Data_Summary(n).drug, Drug)
        AM_Event_Rate(n,1)=Data_Summary(n).Session1_Mean_Ca_Event_Rate;
    end
end
AM_Event_Rate(AM_Event_Rate==0)=[];
AM_Event_Rate_Mean = mean(AM_Event_Rate);

end